import React from 'react';
import ReactDOM from 'react-dom';
import { Column, Table } from 'react-virtualized';
import 'react-virtualized/styles.css'; // only needs to be imported once

import './index.css';

// Grid data as an array of arrays
const list = [
    { no: 0, name: '小王', sex: '男', age: 32, country: "中国", description: 'Software engineer' }
    // And so on...
];

for (var i = 0; i < 200; i++) {
    list.push({ no: i, name: '小王', sex: '男', age: 32, country: "中国", description: 'Software engineer' });
}



class ThreeView extends React.Component {

    render() {
        return (
            <Table
                width={800}
                height={300}
                headerHeight={40}
                rowHeight={40}
                rowCount={list.length}
                rowGetter={({ index }) => list[index]}
            >
                <Column
                    label='编号'
                    dataKey='no'
                    width={100}
                />
                <Column
                    label='姓名'
                    dataKey='name'
                    width={100}
                />
                <Column
                    label='年龄'
                    dataKey='age'
                    width={100}
                />
                <Column
                    label='性别'
                    dataKey='sex'
                    width={100}
                />
                <Column
                    label='编号'
                    dataKey='name'
                    width={100}
                />
                <Column
                    width={200}
                    label='职位'
                    dataKey='description'
                />
            </Table>


        );
    }
}
export default ThreeView;